package com.vcens.dingnotice.task.init;

import com.vcens.dingnotice.entity.TaskEntity;
import com.vcens.dingnotice.service.impl.TaskerServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @Author VeChar
 * @Desc
 * @CreateTime 2018/9/29 11:54 PM
 **/
@Slf4j
@Component
public class InitTaskRunner implements ApplicationRunner {

    @Autowired
    private TaskerServiceImpl taskerService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        taskerService.buildTask(1000);
        taskerService.buildTask(1001);
    }
}
